<template>
  <div>
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <TodayRecommend></TodayRecommend>
    <GoodsRank></GoodsRank>
    <GuessLike></GuessLike>
    <ShowFloor
      v-for="(floors, index) in floorList"
      :key="index"
      :floors="floors"
    ></ShowFloor>
    <IconBrand></IconBrand>
  </div>
</template>

<script>
//引入组件
import ListContainer from "@/pages/Home/ListContainer";
import TodayRecommend from "@/pages/Home/TodayRecommend";
import GoodsRank from "@/pages/Home/GoodsRank";
import GuessLike from "@/pages/Home/GuessLike";
import ShowFloor from "@/pages/Home/ShowFloor";
import IconBrand from "@/pages/Home/IconBrand";
import { mapState } from "vuex";

export default {
  name: "RootHome",
  mounted() {
    //派发
    this.$store.dispatch("home/getFloorList");
  },
  computed: {
    ...mapState("home", ["floorList"]),
  },

  components: {
    ListContainer,
    TodayRecommend,
    GoodsRank,
    GuessLike,
    ShowFloor,
    IconBrand,
  },
};
</script>

<style>
</style>